<template>
  <div id="app">
    <SonA/>
  </div>
</template>

<script>
import SonA from './components/SonA.vue'
// provide  &  inject  跨级共享数据
export default {
  components:{
    SonA
  },
  provide(){
      return {
        color:'hotpink',
        user:{
          name:'张三',
          age:18
        }
      }
    }
}
</script>

<style>

</style>
